Optimal. Leaf size=45 \[ \frac {x^{m+2} (a B+A b)}{m+2}+\frac {a A x^{m+1}}{m+1}+\frac {b B x^{m+3}}{m+3} \]
________________________________________________________________________________________
Rubi [A] time = 0.02, antiderivative size = 45, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {76} \begin {gather*} \frac {x^{m+2} (a B+A b)}{m+2}+\frac {a A x^{m+1}}{m+1}+\frac {b B x^{m+3}}{m+3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 76
Rubi steps
\begin {align*} \int x^m (a+b x) (A+B x) \, dx &=\int \left (a A x^m+(A b+a B) x^{1+m}+b B x^{2+m}\right ) \, dx\\ &=\frac {a A x^{1+m}}{1+m}+\frac {(A b+a B) x^{2+m}}{2+m}+\frac {b B x^{3+m}}{3+m}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 57, normalized size = 1.27 \begin {gather*} \frac {x^{m+1} (a (m+3) (A (m+2)+B (m+1) x)+b (m+1) x (A (m+3)+B (m+2) x))}{(m+1) (m+2) (m+3)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.03, size = 0, normalized size = 0.00 \begin {gather*} \int x^m (a+b x) (A+B x) \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.69, size = 92, normalized size = 2.04 \begin {gather*} \frac {{\left ({\left (B b m^{2} + 3 \, B b m + 2 \, B b\right )} x^{3} + {\left ({\left (B a + A b\right )} m^{2} + 3 \, B a + 3 \, A b + 4 \, {\left (B a + A b\right )} m\right )} x^{2} + {\left (A a m^{2} + 5 \, A a m + 6 \, A a\right )} x\right )} x^{m}}{m^{3} + 6 \, m^{2} + 11 \, m + 6} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 1.28, size = 143, normalized size = 3.18 \begin {gather*} \frac {B b m^{2} x^{3} x^{m} + B a m^{2} x^{2} x^{m} + A b m^{2} x^{2} x^{m} + 3 \, B b m x^{3} x^{m} + A a m^{2} x x^{m} + 4 \, B a m x^{2} x^{m} + 4 \, A b m x^{2} x^{m} + 2 \, B b x^{3} x^{m} + 5 \, A a m x x^{m} + 3 \, B a x^{2} x^{m} + 3 \, A b x^{2} x^{m} + 6 \, A a x x^{m}}{m^{3} + 6 \, m^{2} + 11 \, m + 6} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.00, size = 98, normalized size = 2.18 \begin {gather*} \frac {\left (B b \,m^{2} x^{2}+A b \,m^{2} x +B a \,m^{2} x +3 B b m \,x^{2}+A a \,m^{2}+4 A b m x +4 B a m x +2 B b \,x^{2}+5 A a m +3 A b x +3 B a x +6 A a \right ) x^{m +1}}{\left (m +3\right ) \left (m +2\right ) \left (m +1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.89, size = 53, normalized size = 1.18 \begin {gather*} \frac {B b x^{m + 3}}{m + 3} + \frac {B a x^{m + 2}}{m + 2} + \frac {A b x^{m + 2}}{m + 2} + \frac {A a x^{m + 1}}{m + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.44, size = 95, normalized size = 2.11 \begin {gather*} x^m\,\left (\frac {x^2\,\left (A\,b+B\,a\right )\,\left (m^2+4\,m+3\right )}{m^3+6\,m^2+11\,m+6}+\frac {B\,b\,x^3\,\left (m^2+3\,m+2\right )}{m^3+6\,m^2+11\,m+6}+\frac {A\,a\,x\,\left (m^2+5\,m+6\right )}{m^3+6\,m^2+11\,m+6}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.59, size = 389, normalized size = 8.64 \begin {gather*} \begin {cases} - \frac {A a}{2 x^{2}} - \frac {A b}{x} - \frac {B a}{x} + B b \log {\relax (x )} & \text {for}\: m = -3 \\- \frac {A a}{x} + A b \log {\relax (x )} + B a \log {\relax (x )} + B b x & \text {for}\: m = -2 \\A a \log {\relax (x )} + A b x + B a x + \frac {B b x^{2}}{2} & \text {for}\: m = -1 \\\frac {A a m^{2} x x^{m}}{m^{3} + 6 m^{2} + 11 m + 6} + \frac {5 A a m x x^{m}}{m^{3} + 6 m^{2} + 11 m + 6} + \frac {6 A a x x^{m}}{m^{3} + 6 m^{2} + 11 m + 6} + \frac {A b m^{2} x^{2} x^{m}}{m^{3} + 6 m^{2} + 11 m + 6} + \frac {4 A b m x^{2} x^{m}}{m^{3} + 6 m^{2} + 11 m + 6} + \frac {3 A b x^{2} x^{m}}{m^{3} + 6 m^{2} + 11 m + 6} + \frac {B a m^{2} x^{2} x^{m}}{m^{3} + 6 m^{2} + 11 m + 6} + \frac {4 B a m x^{2} x^{m}}{m^{3} + 6 m^{2} + 11 m + 6} + \frac {3 B a x^{2} x^{m}}{m^{3} + 6 m^{2} + 11 m + 6} + \frac {B b m^{2} x^{3} x^{m}}{m^{3} + 6 m^{2} + 11 m + 6} + \frac {3 B b m x^{3} x^{m}}{m^{3} + 6 m^{2} + 11 m + 6} + \frac {2 B b x^{3} x^{m}}{m^{3} + 6 m^{2} + 11 m + 6} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________